
#include <iostream>
#include <tbb/task_scheduler_init.h>
#include <borealis/Clock.hpp>

#include "include\Aurora.hpp"

#ifdef _DEBUG
	#pragma comment(lib,"borealis_debug.lib")
#else
	#pragma comment(lib,"borealis.lib")
#endif // _DEBUG


int main(int argc, char* argv[])
{	
#ifdef _DEBUG
	tbb::task_scheduler_init init(1);
#else
	tbb::task_scheduler_init init;
#endif // _DEBUG

	Aurora::Aurora model;
	Borealis::Clock time;

	try
	{	
		Borealis::Logger::GetInstance().InitLog("Model.log");

		time.tic();

		model.OpenProject("490_1 - CBW.bprj");


		model.Run();
		double duration = time.toc() / 1000000.0;
		std::cout << "Total time: " << duration << std::endl;

	}
	catch (std::runtime_error e)
	{
		std::cout << e.what() << std::endl;
	}
	catch( ... )
	{
		std::cout << "Unknown error" << std::endl;
	}

	return 0;
}